package com.woniuxy.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;

@Controller
@RequestMapping("rbacManager")
public class RbacManagerController {
    @RequestMapping("/findAll")
    public ModelAndView findAll(HttpServletRequest request){
               ModelAndView modelAndView=new ModelAndView();
               modelAndView.addObject("username",request.getParameter("user"));
               modelAndView.addObject("password","password");
               modelAndView.setViewName("/WEB-INF/jsp/success.jsp");
               return modelAndView;
    }
    @RequestMapping("/findOne")
    public ModelAndView findOne(HttpServletRequest request){
        ModelAndView modelAndView=new ModelAndView();
        modelAndView.addObject("username",request.getParameter("user"));
        modelAndView.addObject("password","222");
        modelAndView.setViewName("/WEB-INF/jsp/success.jsp");
        return modelAndView;
    }

}
